// login.module.less
@primary-color: #2F82FF;
@text-color: #333;
@light-text: #757575;
@footer-text: #969799;
@form-width: 522px;
@form-height: 522px;
@input-height: 48px;
@mobile-breakpoint: 768px;

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  @media (max-width: @mobile-breakpoint) {
    padding: 30px 20px;
    background-image: none !important;
    background-color: #f5f5f5;
  }
}

.logoLogin {
  position: absolute;
  margin: 58px 0 0  60px;

  @media (max-width: @mobile-breakpoint) {
    position: relative;
    margin: 0 auto 30px;
    text-align: center;
  }

  img {
    width: 160px;
    height: 36px;

    @media (max-width: @mobile-breakpoint) {
      width: 120px;
      height: auto;
    }
  }
}

.formContainer {
  position: absolute;
  width: 100%;
  height: 100%;

  @media (max-width: @mobile-breakpoint) {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    height: auto;
    margin-top: 30px;
  }
}

.loginForm {
  width: @form-width;
  height: @form-height;
  background: #fff;
  padding: 40px 40px 0 40px;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

  @media (max-width: @mobile-breakpoint) {
    width: 100%;
    height: auto;
    padding: 30px 20px;
  }
}

.title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 72px;
  text-align: center;

  @media (max-width: @mobile-breakpoint) {
    margin-bottom: 40px;
    font-size: 20px;
  }
}

.inputField {
  width: 100%;
  height: @input-height;

  :global {
    .ant-input-affix-wrapper {
      display: flex;
      align-items: center;
    }

    .ant-input-prefix {
      display: flex;
      align-items: center;
      margin-right: 8px;
      color: @primary-color;

      svg {
        width: 16px;
        height: 16px;
      }
    }
  }
}

.submitButton {
  width: 100%;
  height: @input-height;
}

.agreement {
  text-align: center;
  color: @light-text;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  bottom: 30px;
  width: 100%;
  z-index: 100;
  margin-top: 30px;
  color: @footer-text;

  a {
    color: @footer-text;

    &:hover {
      color: @primary-color;
    }
  }

  @media (max-width: @mobile-breakpoint) {
    position: relative;
    margin-top: 30px;
    bottom: auto;
  }

}
/* 表单容器样式 */
.loginFormContainer {
  width: 100%;
  height: 100%;
  max-width: 522px; /* 设置最大宽度 */
}

.loadingContainer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.loadingContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 300px;
  width: 100%;
}

.logoAnimation {
  position: relative;
  margin-bottom: 24px;
}

.logo {
  width: 160px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  animation: float 2s ease-in-out infinite;
}

.loadingDots {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #1890ff;
  display: inline-block;
  animation: bounce 1.4s infinite ease-in-out both;

  &:nth-child(1) {
    animation-delay: -0.32s;
  }

}

.loadingText {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.progressBar {
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1890ff, #36cfc9);
  animation: progress 2s ease-in-out infinite;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1.0);
  }
}

@keyframes progress {
  0% { width: 0; left: 0; }
  50% { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

